import os
from PIL import Image
from tkinter import filedialog

f_names = filedialog.askopenfilenames()

for f_name in f_names:
    with Image.open(f_name) as image:
        image.convert('RGB').save(os.path.splitext(f_name)[0] + '.pdf')